﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain.Module.Roles;
using Framework.DCI;
using Domain.Module.Entities;

namespace Domain.Roles
{
    class Commentator : Role<User>, ICommentator
    {
        #region ICommentator Members

        public Commentator(User actor)
            : base(actor)
        {

        }

        public void DoComment(IBeCommented beCommented, Infrastructure.DataObjects.CommentObject commentObj)
        {
            var comment = Comment.Create(commentObj);
            beCommented.AddComment(comment);
            _actor.CommittedComments.Add(comment);
        }

        #endregion
    }
}
